﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ShevaEngine2GUI.Styles;
using ShevaEngine2GUI.Styles.Interfaces;
using ShevaEngine2GUI.Styles.Default;

namespace ShevaEngine2GUI.Controls
{
    /// <summary>
    /// Button class.
    /// </summary>
    public class Button : ButtonBase
    {
        /// <summary>Button style.</summary>
        public IButtonStyle Style;

        /// <summary>
        /// Constructor.
        /// </summary>
        public Button()
            : base()
        {
            this.Style = DefaultButtonStyle.Instance;
        }

        /// <summary>
        /// Method Draw().
        /// </summary>
        public override void Draw()
        {
            if (!this.ControlUnderCursor)
                this.Style.DrawNormally(this);
            else
                this.Style.DrawMouseOver(this);
        }
    }
}
